package ui.swing.list;

import java.awt.BorderLayout;

import javax.swing.JFrame;
import javax.swing.JList;
import javax.swing.JScrollPane;

public class StatesList extends JFrame {

	private static final long serialVersionUID = -5833500955791082256L;
	
	private static final String [] states = {
			"AK\tAlaska\tJuneau",
			"AL\tAlabama\tMontgomery",
			"AR\tArkansas\tLittle\tRock",
			"AZ\tArizona\tPhoenix",
			"CA\tCalifornia\tSacramento",
			"CO\tColorado\tDenver",
			"CT\tConnecticut\tHartford",
			"DE\tDelaware\tDover",
			"FL\tFlorida\tTallahassee",
			"GA\tGeorgia\tAtlanta",
			"HI\tHawaii\tHonolulu",
			"IA\tIowa\tDes\tMoines",
			"ID\tIdaho\tBoise",
			"IL\tIllinois\tSpringfield",
			"IN\tIndiana\tIndianapolis",
			"KS\tKansas\tTopeka",
			"KY\tKentucky\tFrankfort",
			"LA\tLouisiana\tBaton\tRouge",
			"MA\tMassachusetts\tBoston",
			"MD\tMaryland\tAnnapolis",
			"ME\tMaine\tAugusta",
			"MI\tMichigan\tLansing",
			"MN\tMinnesota\tSt.Paul",
			"MO\tMissouri\tJefferson\tCity",
			"MS\tMississippi\tJackson",
			"MT\tMontana\tHelena",
			"NC\tNorth\tCarolina\tRaleigh",
			"ND\tNorth\tDakota\tBismarck",
			"NE\tNebraska\tLincoln",
			"NH\tNew\tHampshire\tConcord",
			"NJ\tNew\tJersey\tTrenton",
			"NM\tNew\tMexico\tSantaFe",
			"NV\tNevada\tCarson\tCity",
			"NY\tNew\tYork\tAlbany",
			"OH\tOhio\tColumbus",
			"OK\tOklahoma\tOklahoma\tCity",
			"OR\tOregon\tSalem",
			"PA\tPennsylvania\tHarrisburg",
			"RI\tRhode\tIsland\tProvidence",
			"SC\tSouth\tCarolina\tColumbia",
			"SD\tSouth\tDakota\tPierre",
			"TN\tTennessee\tNashville",
			"TX\tTexas\tAustin",
			"UT\tUtah\tSalt\tLake\tCity",
			"VA\tVirginia\tRichmond",
			"VT\tVermont\tMontpelier",
			"WA\tWashington\tOlympia",
			"WV\tWest\tVirginia\tCharleston",
			"WI\tWisconsin\tMadison",
			"WY\tWyoming\tCheyenne"
			};
	
	protected JList m_statesList;

	public StatesList() {
		super("Swing List [Base]");
		setSize(500, 240);
		
		m_statesList = new JList(states);
		JScrollPane jsp = new JScrollPane(m_statesList);
		//jsp.getViewport().setView(m_statesList);
		
		getContentPane().add(jsp, BorderLayout.CENTER);
		
		setDefaultCloseOperation(EXIT_ON_CLOSE);
		setVisible(true);
	}
	
	public static void main(String[] args) {
		new StatesList();
	}
}
